Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #776: onlyUpgradable change the filter to versions where the current version is not the latest one #777

Conversation

andrzejj0
Copy link
Contributor

@andrzejj0 andrzejj0 commented Oct 21, 2022

Root cause of the issue: VersionsHelper.lookupDependenciesUpdates actually returns all dependency versions, and not just updates.

The problem manifested itself when the currently used version was the latest, but there were more versions reported (older than the current one).

This is now corrected, i.e. the method returns only updates, in contrast to lookupArtifactVersions.

onlyUpgradableOnly looks to work fine now. Updated the unit tests to test also for cases when the version used by an artifact is the latest version, but there are more available versions (older than the current one).

Removed some redundant classes implementing Callable, which could very easily be inlined which results in a much cleaner code.

Also, as a minor pedantic fix, corrected the "splitted" [sic] to "split" in one method name.

@andrzejj0
Copy link
Contributor Author

@slawekjaranowski Please review and merge.

@andrzejj0 andrzejj0 marked this pull request as draft October 22, 2022 07:37
@andrzejj0
Copy link
Contributor Author

andrzejj0 commented Oct 22, 2022

Converting to draft -- I'll quickly try to do it properly.

Looks like it's now working and is done properly.

…here the current version is not the latest one
@andrzejj0 andrzejj0 force-pushed the issue-776-only-upgradable-not-working branch from 7aaf138 to 6c347a7 Compare October 22, 2022 08:26
@andrzejj0 andrzejj0 marked this pull request as ready for review October 22, 2022 08:26
@slawekjaranowski slawekjaranowski added this to the 2.13.0 milestone Oct 22, 2022
@slawekjaranowski slawekjaranowski linked an issue Oct 22, 2022 that may be closed by this pull request
@slawekjaranowski slawekjaranowski merged commit d421b45 into mojohaus:master Oct 22, 2022
@andrzejj0 andrzejj0 deleted the issue-776-only-upgradable-not-working branch October 22, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onlyUpgradable does not work for dependency-updates-report
2 participants